﻿package {	import flash.display.MovieClip	import flash.text.TextField	public class Shot extends MovieClip{		private var last:Number;				public var X:Number		public var Y:Number		public var XSpeed:Number = 0;		public var YSpeed:Number = 0;		public var Id:String;		public var Spawn:Number;		function Shot(id:String, time:Number, x:Number, y:Number, xspeed:Number, yspeed:Number, angle){			this.Id = id;			this.x = this.X = x			this.y = this.Y = y			this.XSpeed = xspeed			this.YSpeed = yspeed			this.rotation = 180/Math.PI*angle			this.cacheAsBitmap = true;			Spawn = time;			last = time;			Tick(time);					}				public function Tick(time:Number):Boolean{			var offset = time - last;			for( var a:int=0;a<offset;a++){				X += XSpeed;				Y += YSpeed;			}						this.x = X			this.y = Y			last = time;			//			this.alpha = (3000-(time-Spawn))/3000			return time-Spawn > 3000		}	}}